#ifndef FACTORY_H_
#define FACTORY_H_

#include "widget.h"

class WidgetFactory
{
public:
	virtual Window* createWindow() = 0;
	virtual ScrollBar* createScrollBar() = 0;
};

class PMWidgetFactory : public WidgetFactory
{
public:
	Window* createWindow()
	{
		return new PMWindow();
	}

	ScrollBar* createScrollBar()
	{
		return new PMScrollBar();
	}
};

class MotifWidgetFactory : public WidgetFactory
{
public:
	Window* createWindow()
	{
		return new MotifWindow();
	}

	ScrollBar* createScrollBar()
	{
		return new MotifScrollBar();
	}
};

#endif // FACTORY_H_
